package second.little

/**
  * Created by feng on 24/11/2018.
  */
object ParitialFuncDemo {

  def fun1:PartialFunction[String,Int] ={
    case "one" => 1
    case "two" => 2
    case _ => 9
  }

  def func2(num:String):Int = num match{
    case "one" => 1
    case "two" => 2
  }

}
